<template>
  <div class="menu-button-container" @click="handleClick">
    <slot></slot>
  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: "MenuButton",
});

const emit = defineEmits<{
  (e: "click-menu-button"): void;
}>();

const handleClick = () => {
  emit("click-menu-button");
};
</script>

<style scoped lang="scss">
.menu-button-container {
  width: 26px;
  height: 26px;
  background-color: rgba(255, 255, 255, 0.2); /* 白色透明背景 */
  border-radius: 8px; /* 圆角边框 */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;

  /* 鼠标悬停效果 */
  &:hover {
    background-color: rgba(255, 255, 255, 0.3);
  }
}
</style>
